package com.qp.bookkeeping.business.book.controller;

import com.qp.bookkeeping.business.book.model.req.QueryColumnReq;
import com.qp.bookkeeping.business.book.model.rsp.QueryColumnRsp;
import com.qp.bookkeeping.business.book.service.ColumnService;
import com.qp.bookkeeping.common.model.rsp.BaseRsp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xutianqi
 */
@RestController
@RequestMapping("column")
public class ColumnController {
    @Autowired
    ColumnService columnService;

    @PostMapping("queryColumns")
    public BaseRsp<QueryColumnRsp> queryColumns(@RequestBody QueryColumnReq queryColumnReq) {
        return BaseRsp.success(columnService.queryColumns(queryColumnReq));
    }
}
